package com.srd.phone.bean;

import org.json.JSONException;
import org.json.JSONObject;

public class UserList {

    public String real;
    public int age;
    public String sex;
    public String idCard;

    public static UserList parseData(String data){
        UserList item = new UserList();
        try {
            JSONObject jsonObject = new JSONObject(data);
            item.real = jsonObject.optString("real", "--");
            item.age = jsonObject.optInt("age");
            item.sex = jsonObject.optString("sex", "--");
            item.idCard = jsonObject.optString("idCard", "--");

        } catch (JSONException e) {
            e.printStackTrace();
        }

        return item;

    }

}
